import request from '@/utils/request'

export function fetchDorm() {
  return request({
    url: '/dormitory/get-All',
    method: 'get'
  })
}

export function updateDorm(data) {
  return request({
    url: '/dormitory/update',
    method: 'put',
    data
  })
}

export function createDorm(data) {
  return request({
    url: '/dormitory/save-one',
    method: 'post',
    data
  })
}

export function deleteDorm(data) {
  return request({
    url: '/dormitory/delete',
    method: 'delete',
    params: data
  })
}
